package spring.yongongsystem.service;

import spring.yongongsystem.POJO.dto.WorkerDTO;
import spring.yongongsystem.POJO.dto.WorkerPageQueryDTO;
import spring.yongongsystem.POJO.entity.Worker;
import spring.yongongsystem.result.PageResult;

public interface WorkerService {
    /**
     * 用工登陆
     * @param workerDTO
     * @return
     */
    Worker login(WorkerDTO workerDTO);

    /**
     * 新增用工
     * @param workerDTO
     */
    void save(WorkerDTO workerDTO);

    /**
     * 用工分页查询
     * @param workerPageQueryDTO
     * @return
     */
    PageResult pageQuery(WorkerPageQueryDTO workerPageQueryDTO);

    void deleteById(Long id);

    void update(WorkerDTO workerDTO);

    /**
     * 加入小组
     * @param id
     */
    void saveGroup(Long id,Long groupId);

    /**
     * 推出小组
     * @param id
     */
    void backGroup(Long id);

    /**
     * 接受订单
     * @param workerId
     * @param orderId
     */
    void accept(Long workerId, Long orderId);

    /**
     * 完成订单
     * @param id
     */
    void success(Long id,String photo);
}
